#include<iostream>
#include<unistd.h>
#include<signal.h>
#include<sys/types.h>

int main(int argc, char *argv[])
{
    if(argc != 3)
    {
        std::cout << "Usage: " << argv[0] << " -signumber pid" << std::endl;
        return 1;
    }
    int number = std::stoi(argv[1] + 1);//去掉-  stoi将字符串转换成整数
    pid_t pid = std::stoi(argv[2]);

    int n = kill(pid, number);
    return 0;
}